{% extends "base_generic.html" %}

{% block content %}
  <div class="card">
    <h1>图书列表</h1>
    {% if book_list %}
      <ul>
        {% for book in book_list %}
          <li style="margin-bottom:10px;">
            <a href="{{ book.get_absolute_url }}" class="btn btn-main">{{ book.title }}</a>
            <span class="text-muted">（作者：{{book.author}}）</span>
          </li>
        {% endfor %}
      </ul>
    {% else %}
      <p>当前没有图书。</p>
    {% endif %}
  </div>
{% endblock %}
